package v1

import (
	"github.com/gogf/gf/v2/frame/g"
)

type TaskCreateReq struct {
	g.Meta            `path:"/task/create" tags:"task" method:"post" summary:"创建任务"`
	TaskName          string `json:"taskName" v:"required#任务名称为必填参数"`
	TaskGroup         string `json:"taskGroup" v:"required#任务分组为必填参数"`
	TaskCron          string `json:"taskCron" v:"required#任务cron表达式为必填参数"`
	TaskInvokeTarget  string `json:"taskInvokeTarget" v:"required#任务调用目标为必填参数"`
	TaskArgs          string `json:"taskArgs"`
	TaskHttpMethod    string `json:"taskHttpMethod"`
	TaskTimeout       int64  `json:"taskTimeout"`
	TaskMulti         int    `json:"taskMulti"`
	TaskRetryTimes    int    `json:"taskRetryTimes"`
	TaskRetryInterval int64  `json:"taskRetryInterval"`
	TaskTag           string `json:"taskTag"`
	TaskRemark        string `json:"taskRemark"`
	TaskStatus        int    `json:"taskStatus"`
}

type TaskCreateRes struct {
	Uuid string `json:"uuid"`
}
